package com.wxp.business.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wxp.business.form.UserForm;
import com.wxp.mvc.Action;
import com.wxp.mvc.ActionForm;

public class UserLoginAction implements Action {

	@Override
	public String execute(HttpServletRequest request, HttpServletResponse response, ActionForm form) {
		String result = "loginError";
		UserForm userForm = (UserForm) form;
		String userName = userForm.getUserName();
		String password = userForm.getPassword();
		if ("wxp".equals(userName) && "123456".equals(password)) {
			result = "loginSuccess";
		}

		return result;
	}

}
